<?php
	
	include("config.php");
	
	$department = $_GET["department"];
	//$login = $_GET["user"];
	
	$result=mysql_query("SELECT * FROM course WHERE year = '2010' AND semester = 'fall' AND department = '".$department."' ORDER BY number");
	$row=mysql_fetch_array($result);
	
	echo "<form action='' name='courseForm'>";
	echo "<SELECT NAME='course' SIZE='10' onchange='courseSelectorHandler(document.courseForm.course.value);' MULTIPLE>";
	echo "<OPTION SELECTED value='".$row['id']."'>".$row['number']." ".$row['name']."</OPTION>";
	
	while ($row=mysql_fetch_array($result))
	{
		echo "<OPTION value='".$row['id']."'>".$row['number']." ".$row['name']."</OPTION>";
	}
	
	echo "</SELECT>";
	echo "</form>";
?>